class Solution:
    # def isPalindrome(self, x: int) -> bool:
    #     list1=list(str(x))
    #     flag=0
    #
    #     for index,n in enumerate(list1[::-1]):
    #         if n!=list1[index]:
    #             return False
    #     return True
    def isPalindrome(self, x: int) -> bool:
        if x<0:
           return False
        str1=str(x)
        return str1 == str1[::-1]




ll=Solution()
print(ll.isPalindrome(121))